nmc(pe-item3): host-level dual-path won-aux broadcaster regression lock - #451
Merged
Conversation
frstrtr
force-pushed
the
nmc/pe-item3-host-dualpath-lock
branch
2 times, most recently
from
June 25, 2026 13:03
7a626f6 to
009a3dd
Compare
Net-new vs the helper-level nmc_block_broadcast_test (which only checks sink PRESENCE): reconstruct the NMC run-loop binding exactly as c2pool_refactored.cpp does -- set_block_relay -> merged_broadcasters [chain_id] -> submit_block_raw (PRIMARY P2P) and set_fallback_backend -> AuxChainRPC::submit_aux_block (FALLBACK submitauxblock) -- and lock DELIVERY through BOTH legs with fake sinks. host_dual_path_delivered() asserts both networks were ACTUALLY reached, so a refactor that drops set_block_relay, drops set_fallback_backend, or mis-keys merged_broadcasters by chain_id turns the lock RED. The mis-key case is the insidious one: p2p_sent stays true (sink present) yet the peer broadcaster is never invoked -- a delivery-level invariant the presence-only helper KAT cannot catch. Test-only, fake sinks, zero consensus surface (no PoW/share/aux-commit/ template/PPLNS). nmc/ isolated; consumes coin/block_broadcast.hpp only. Registered in test/CMakeLists.txt AND both build.yml --target allowlist rows (Linux + ASan) -- no #137/#143 NOT_BUILT sentinel. 5/5 local PASS.
frstrtr
force-pushed
the
nmc/pe-item3-host-dualpath-lock
branch
from
June 25, 2026 13:04
009a3dd to
15915c0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Host-level dual-path regression LOCK for NMC PE item 3 — net-new vs the helper-level
nmc_block_broadcast_test(which hands raw sinks to the dispatcher and only checks sink presence).This test reconstructs the actual NMC run-loop binding exactly as
src/c2pool/c2pool_refactored.cppwires it, then locks delivery through both legs with fake sinks:backend->set_block_relay([merged_broadcasters, chain_id]{...}) -> merged_broadcasters[chain_id]->submit_block_raw(bytes)(host site ~c2pool_refactored.cpp:5276; returns relayed peer count)mm_manager->set_fallback_backend(chain_id, AuxChainRPC) -> AuxChainRPC::submit_aux_block(hash_hex, auxpow_hex)(host site ~:5290 / merged_mining.cpp:454)Acceptance mapping
BindsBothLegsAndDeliversToBothNetworksasserts both networks are actually reached and each leg gets the exact payload.host_dual_path_delivered()checks delivery, not presence:DropP2pRelayBindingIsCaught(set_block_relay deleted)DropFallbackBindingIsCaught(set_fallback_backend deleted)MiskeyedChainIdSilentlyDropsP2pButLockCatchesIt— the insidious one:p2p_sentstays true (sink present) yet the peer broadcaster is never invoked. A delivery-level invariant the presence-only helper KAT cannot catch.NeitherLegBoundNeverSilentDrops— both dropped -> ERROR scream,any()==false.nmc_host_dualpath_testto BOTH--targetrows (Linux L84 + ASan L216) andtest/CMakeLists.txt(executable +gtest_add_tests). No dgb: conform subsidy to p2pool-dgb-scrypt oracle (COIN=1e6, weeks+1) [COMPAT] #137/ci: build test_dgb_subsidy in both Linux test jobs (fix master-red NOT_BUILT) #143 NOT_BUILT sentinel.Scope / safety
Test-only, fake sinks, zero consensus surface — no PoW hash, share format, aux commitment, template, or PPLNS math.
src/impl/nmc/isolated; consumescoin/block_broadcast.hpp(core/log.hpp only) — no btc/ or dgb/ symbol. Does not wire the live won-aux trigger or .140 submitauxblock client (item3-live / item4, gated on operator NMC-go).Verification
5/5 local PASS; target builds + links clean (reconfigured build dir picks it up). Signed, no third-party attribution.
I do not self-merge — over to you for the gh rollup verify + merge tap.